package com.lw.dao;

import com.lw.entity.SuccessKilled;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by IntelliJ IDEA
 *
 * @Author L1W31
 * @Date 2021/8/3 20:33
 * @Version 1.0
 * @Description SuccessKilled的dao接口
 */

@Repository
public interface SuccessKilledDao {

    /**
    * @Description: 插入秒杀购买明细，可过滤重复
    * @Param: [secKillId, userPhone]
    * @return: 插入的行数
    */
    int insertSuccessKilled (@Param("secKillId") long secKillId, @Param("userPhone") long userPhone);

    /**
    * @Description: 根据id查询SuccessKilled并携带秒杀产品对象实体
    * @Param: [secKillId, userPhone]
    * @return: SuccessKilled对象
    */
    SuccessKilled queryByIdWithSecKill (@Param("secKillId") long secKillId, @Param("userPhone") long userPhone);
}
